package com.liangzhong.modules.guess.command
{
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.proxy.footballLottery.FootballLotteryProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 *竞猜 
	 * @author lake
	 * 
	 */	
	public class GuessCommand extends SimpleCommand
	{
		public function GuessCommand()
		{
			super();
		}
		override public function execute(notification:INotification):void
		{
			var proxy :FootballLotteryProxy = facade.retrieveProxy(FootballLotteryProxy.ProxyName) as FootballLotteryProxy;
			switch(notification.getName())
			{
				case ApplicationConstants.Guess_GetGuessList://请求竞猜列表
				{
					proxy.getGuessList();
					break;
				}
				case ApplicationConstants.Guess_GetMyGuessList://请求我的竞猜列表
				{
					proxy.getMyGuessList();
					break;
				}
				case ApplicationConstants.Guess_Bet://押注
				{
					proxy.bet(notification.getBody());
					break;
				}
			}
		}
	}
}